// Response.java

package com.ruoyi.hospital.entity.check;

import com.ruoyi.service.domain.ServiceOrders;

@lombok.Data
public class CheckInfoRsp {

    private Long orderId;
    private String orderIdVO;
    /**
     * 订单状态code
     */
    private String orderCode;
    /**
     * 订单状态描述
     */
    private String orderStatus;
    /**
     * 订单完成服务时间
     */
    private String orderFinishTime;

    /**
     * 服务明细
     */
    private CheckServiceInfo serviceInfo;
    /**
     * 耗材明细
     */
    private CheckConsumeInfo consumeInfo;
    /**
     * 其他明细
     */
    private CheckOthersInfo othersInfo;
    /**
     * 行程明细
     */
    private CheckTaxiInfo taxiInfo;
    /**
     * 护士的证明材料
     */
    private CheckNurProofs nurProofs;

    /**
     * 预付费用
     */
    private CheckPrepaidAmount prepaidAmount;
    /**
     * 最终费用信息
     */
    private CheckSettlement settlement;


    public void init(ServiceOrders order) {
        this.orderId = order.getOrderId();
        this.orderIdVO = order.getOrderCode();
        //DateFormat cstFormate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        //String creatTimeNew = cstFormate.format(order.getOrderCreateTime());
        //this.orderCreateTime = creatTimeNew;

        switch (order.getOrderServiceflag()){
            case 11:
                this.setOrderCode("unsettled");
                this.setOrderStatus("待结算");
                break;
            case 12:
            case 13:
                this.setOrderCode("unsettled");
                this.setOrderStatus("结算中");
                break;
            case 14:
            case 15:
            case 16:
            case 17:
                this.setOrderCode("settled");
                this.setOrderStatus("已结算");
                break;
            //case 2:
            //    this.setOrderCode("canceled");
            //    this.setOrderStatus("已退单");
            //    break;
            //case 4:
            //    this.setOrderCode("canceled");
            //    this.setOrderStatus("已退单");
            //    break;
        }
        //if("1".equals(order.getOrderUseFlag())){
        //    this.setOrderCode("unpaid");
        //    this.setOrderStatus("待付款");
        //}
        //
        //if((order.getOrderFlag() == 1) || (order.getOrderFlag() == 3) || (order.getOrderFlag() == 4)){
        //    this.setOrderCode("canceled");
        //    this.setOrderStatus("已取消");
        //}


    }



}
